import java.util.Scanner;
import java.util.Stack;

public class Math {


    public static void main(String[] args) {
        Stack<Character> stack = new Stack<>();
        Scanner scanner=new Scanner(System.in);
        String s=scanner.nextLine();
        for (int i = 0; i < s.length(); i++) {
            char ch=s.charAt(i);
            if(ch=='+'){
                char m= stack.pop();
                int a=Character.getNumericValue(m);
                int b=Character.getNumericValue(s.charAt(i+1));
                int c=a+b;
                char cch=Character.forDigit(c,10);
                stack.push(cch);
                i++;
            }else {
                stack.push(ch);
            }
        }
        int i=Character.getNumericValue(stack.pop());
        stack.pop();
        int j=Character.getNumericValue(stack.pop());
        int m=i*j;
        while(!stack.empty()){

//            if(!stack.empty()){
//                int m=i*j;
//                char lo=Character.forDigit(m,10);
//                stack.push(lo);
//            }else {
//                int q=i*j;
//                System.out.println(q);
//            }
            stack.pop();
            int z=Character.getNumericValue(stack.pop());
            m=m*z;
        }
        System.out.println(m);
    }

}
